/**
 *Copyright (c) 2003, 2018, UMF and/or its affiliates. All rights reserved.
 */
package com.umf.b2b.model.pay;

import com.umf.b2b.MerchantBaseRequest;
import com.umpay.dto.UMFResponse.Message;
import com.umpay.util.UMFUtil;

/**
<p>Title:ConsumeOrderInfo</p>  
<p>Description:���ײ�ѯ</p>
 */
public class ConsumeOrderInfo extends MerchantBaseRequest{
	
	private String order_id;//*����ش���[��Ӧ����] �̻�Ψһ������,�̻����ɵı�ʶ�ñʽ��׵ı�ţ�ҵ����ʱ����Ľ��ױ�ţ�����Ϊ�ַ�����
	private String mer_date;//*����ش���[��Ӧ����] �̻���������,ҵ����ʱ�����ƽ̨���ɶ��������ڣ���ʽYYYYMMDD������Ϊ�ַ���
	private String mer_trace;//*����ش���[��Ӧ����] �̻�֧����ˮ��,�̻�ƽ̨���ɵı�ʶ�ñ�֧�����׵���ˮ�ţ�����ˮ�����̻�ƽ̨�б���Ψһ����ˮ������Ϊ�ַ���
	private String url = "/consume/orderInfo";
	
	private String amount;//[��Ӧ����]֧�����
	private String settle_amt;//[��Ӧ����]������
	private String mer_check_date;//[��Ӧ����]�������ڣ���ʽ��YYYYMMDD
	private String trade_no;//[��Ӧ����]ƽ̨������ˮ��,��������ƽ̨���������󷵻ص�����ƽ̨��ˮ��
	private String trade_state;//[��Ӧ����]����״̬,0��ʼ��1�ɹ���2ʧ�ܡ�3�����С�4���׹ر�
	
	@Override
	public String getRequestUrl() {
		return baseUrl + url;
	}

	@Override
	public ConsumeOrderInfo doRequest() throws Exception {
		Message<ConsumeOrderInfo> response = UMFUtil.get(createAPIContext(), this,ConsumeOrderInfo.class);
		MerchantBaseRequest baseResult = convertResult(response, ConsumeOrderInfo.class);
		if(baseResult == null)
			return null;
		return (ConsumeOrderInfo)baseResult;
	}
	
	public String getMer_id() {
		return mer_id;
	}

	public void setMer_id(String mer_id) {
		this.mer_id = mer_id;
	}

	public String getMer_trace() {
		return mer_trace;
	}

	public void setMer_trace(String mer_trace) {
		this.mer_trace = mer_trace;
	}

	public String getTrade_no() {
		return trade_no;
	}

	public void setTrade_no(String trade_no) {
		this.trade_no = trade_no;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getSettle_amt() {
		return settle_amt;
	}

	public void setSettle_amt(String settle_amt) {
		this.settle_amt = settle_amt;
	}

	public String getMer_check_date() {
		return mer_check_date;
	}

	public void setMer_check_date(String mer_check_date) {
		this.mer_check_date = mer_check_date;
	}

	public String getOrder_id() {
		return order_id;
	}

	public void setOrder_id(String order_id) {
		this.order_id = order_id;
	}

	public String getMer_date() {
		return mer_date;
	}

	public void setMer_date(String mer_date) {
		this.mer_date = mer_date;
	}

	public String getTrade_state() {
		return trade_state;
	}

	public void setTrade_state(String trade_state) {
		this.trade_state = trade_state;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("ConsumeOrderInfo [mer_id=");
		builder.append(mer_id);
		builder.append(", order_id=");
		builder.append(order_id);
		builder.append(", mer_date=");
		builder.append(mer_date);
		builder.append(", mer_trace=");
		builder.append(mer_trace);
		builder.append(", url=");
		builder.append(url);
		builder.append(", amount=");
		builder.append(amount);
		builder.append(", settle_amt=");
		builder.append(settle_amt);
		builder.append(", mer_check_date=");
		builder.append(mer_check_date);
		builder.append(", trade_no=");
		builder.append(trade_no);
		builder.append(", trade_state=");
		builder.append(trade_state);
		builder.append(", version=");
		builder.append(version);
		builder.append(", ret_code=");
		builder.append(ret_code);
		builder.append(", ret_msg=");
		builder.append(ret_msg);
		builder.append(", links=");
		builder.append(links);
		builder.append("]");
		return builder.toString();
	}

}
